﻿using System;
using UnityEngine;
using UnityEngine.UI;

namespace CornerMemo
{
    /// <summary>
    /// UI的项
    /// </summary>
    public class TestUIItem : MonoBehaviour
    {
        public Text idText;
        public Image bgImage;

        public void SetData(TestUIItemData data)
        {
            idText.text = data.Id.ToString();
            bgImage.color = data.Color;
        }
    }

    [Serializable]
    public class TestUIItemData
    {
        public int Id;
        public Color Color;
    }
}